package framework.objects;

import javax.microedition.khronos.opengles.GL10;

import framework.GameCamera;

public abstract class BindScreenObject extends StaticGameObject {

	protected float x0;
	protected float y0;
	
	public BindScreenObject(float x0, float y0) {
		super();
		this.x0 = x0;
		this.y0 = y0;
		synchronizePosition();
	}

	@Override
	public void draw(GL10 gl, float deltaTime) {
		synchronizePosition();
		super.draw(gl, deltaTime);
	}
	
	protected void synchronizePosition() {
		x = x0 + GameCamera.X;
		y = y0 + GameCamera.Y;
	}

}
